package org.jeecg.modules.assets.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.jeecg.common.system.api.ISysBaseAPI;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.assets.service.impl.MdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@Api(tags="md")
@RestController
@RequestMapping("/assets/md")
public class MdController {


    @Autowired
    ISysBaseAPI  isysBaseAPI;
    @Autowired
    MdService mdService;


    /**
     * 查询用户id
     */
    @RequestMapping(value = "/selectUserId")
    @AutoLog(value = "查询用户id")
    @ApiOperation(value="查询用户id", notes="查询用户id")
    public String selectUserId() {
        LoginUser 张三 = isysBaseAPI.getUserByName("张三");
        return null;
    }


    @PostMapping(value = "/exceptionNotification")
    @AutoLog(value = "异常通知")
    @ApiOperation(value="异常通知", notes="异常通知")
    public String endDoubleEndAssets() {
        mdService.endDoubleEndAssets(null);
       return null;
    }
}
